<template>
	<div style=" box-shadow: 0 2px 4px rgba(0, 0, 0, .12), 0 0 6px rgba(0, 0, 0, .04)">
		<el-tag type="info" effect="plain" style="width: 100%; height: 100%;">
			<el-row>
				<el-tag style="float: left;">
					病人基本信息
				</el-tag>
			</el-row>
			<el-row>
				<el-col :span="3">
					<a style="float: left;">姓名:</a><a style="float: left;color: black;">{{returnReg.name}}</a>
				</el-col>
				<el-col :span="3">
					<a style="float: left;">性别:</a><a style="float: left;color: black;">{{returnReg.sex}}</a>
				</el-col>
				<el-col :span="3">
					<a style="float: left;">年龄:</a><a style="float: left;color: black;">{{returnReg.age}}</a><a
						style="float: left;color: black;">岁</a>
				</el-col>
				<el-col :span="3">
					<a style="float: left;">病历号:</a><a style="float: left;color: black;">{{returnReg.recordnum}}</a>
				</el-col>
				<el-col :span="5">
					<a style="float: left;">看诊日期:</a><a style="float: left;color: black;">{{returnReg.viewdate}}</a>
				</el-col>
				<el-col :span="5" pull="1">
					<a style="float: left;">挂号科室:</a><a style="float: left;color: black;">{{returnReg.department}}</a>
				</el-col>
			</el-row>
		</el-tag>
		<el-form ref="form" :model="form" label-width="80px">
			<el-tag type="info" effect="plain" style="width: 100%; height: 100%;">
				<el-row>
					<div style=" padding-left: 10px;">
						<el-tag style="float: left;">
							病史内容
						</el-tag>
					</div>
				</el-row>
				<el-row>
					<el-form-item label="主诉">
						<el-input v-model="returnReg.form.zhusu" style="float: left;" type="textarea" rows="2"></el-input>
					</el-form-item>
					<el-form-item label="过敏史">
						<el-input v-model="returnReg.form.guominshi" style="float: left;" type="textarea" rows="2"></el-input>
					</el-form-item>
					<el-form-item label="现病史">
						<el-input v-model="returnReg.form.xianbingshi" style="float: left;" type="textarea" rows="2"></el-input>
					</el-form-item>
					<el-form-item label="治疗情况">
						<el-input v-model="returnReg.form.zhiliaoqingkuang" style="float: left;" type="textarea" rows="2"></el-input>
					</el-form-item>
					<el-form-item label="体格检查">
						<el-input v-model="returnReg.form.tigejiancha" style="float: left;" type="textarea" rows="2"></el-input>
					</el-form-item>
				</el-row>
			</el-tag>
			<el-tag type="info" effect="plain" style="width: 100%; height: 100%;">
				<el-row>
					<div style=" padding-left: 10px;">
						<el-tag style="float: left;">
							诊断结果
						</el-tag>
					</div>
				</el-row>
				<el-row>
					<el-form-item label="诊断方式">
						<el-select v-model="returnReg.form.zhenduanfangshi" placeholder="请选择诊断方式" style="float: left;">
							<el-option label="中医诊断" value="zhongyi"></el-option>
							<el-option label="西医诊断" value="xiyi"></el-option>
						</el-select>
					</el-form-item>
					<el-form-item label="诊断结果">
						<el-input v-model="returnReg.form.zhenduanjieguo" style="float: left;" type="textarea" rows="2">
						</el-input>
					</el-form-item>
						<el-form-item label="检查建议">
							<el-input v-model="returnReg.form.jianchajianyi" style="float: left;" type="textarea" rows="2">
							</el-input>
						</el-form-item>
							<el-form-item label="治疗建议">
								<el-input v-model="returnReg.form.zhiliaojianyi" style="float: left;" type="textarea" rows="2">
								</el-input>
							</el-form-item>
							<el-form-item label="住院建议">
								<el-input v-model="returnReg.form.zhuyuanjianyi" style="float: left;" type="textarea" rows="2">
								</el-input>
							</el-form-item>
							<el-form-item>
								<el-button type="primary" @click="onSubmit1">安排检验</el-button>
								<el-button type="primary" @click="onSubmit2">开具处方</el-button>
								<el-button type="primary" @click="onSubmit3">预约住院</el-button>
							</el-form-item>
				</el-row>
			</el-tag>
		</el-form>
	</div>
</template>

<script>
	export default {
			mounted:function(){
					this.$axios.get('http://localhost:8080/record.json').then((result) => {
						this.returnReg = result.data; //写法固定
						console.log(returnReg);
					}).catch((err) => {
						console.log(err);
					})
				},
		data() {
			return {
				returnReg:[]
		}
		},
		methods: {
			onSubmit1() {
				console.log('submit!');
			},
			onSubmit2()
			{
				
			},
			onSubmit3()
			{
				
			}
		}
	}
</script>

<style>
	a {
		font-family: "Helvetica Neue", Helvetica, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "微软雅黑", Arial, sans-serif;
		font-size: 12px;
	}
</style>
